package com.cake.ssm.service.impl;

import com.cake.ssm.dao.ActivityMapper;
import com.cake.ssm.po.Activity;
import com.cake.ssm.service.ActivityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * Created by lijiawang1 on 2017/4/23.
 */
@Service
@Transactional
public class ActivityServiceImpl implements ActivityService {
    @Autowired
    private ActivityMapper activirtMapper;
    public void InsertActivity(Activity activity) throws Exception {
        activirtMapper.InsertActivity(activity);
    }
    public List<Activity> SelectAllActivity()throws Exception{
        List<Activity> list=null;
        if(activirtMapper.SelectAllActivity()!=null){
            list=activirtMapper.SelectAllActivity();
        }
        return list;
    }
}
